package com.jss.lanouhn.fristapp.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.TextView;

import com.jss.lanouhn.fristapp.R;

public class HomeSelectSmallFristActivity extends AppCompatActivity {
    private TextView tv;
    private WebView wv;
    private String url="http://www.liwushuo.com/subcategories/195/items";


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home_select_small_frist);
        initData();
    }

    private void initData() {
        tv= (TextView) findViewById(R.id.tv_home_select_frist);
        wv= (WebView) findViewById(R.id.wv_home_select_frist);
        WebSettings webSettings = wv.getSettings();
        wv.loadUrl(url);
        webSettings.setJavaScriptEnabled(true);
        wv.reload();
        wv.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                view.loadUrl(url);
                return true;
            }
        });
    }

}
